package com.zky.gulimall.product.feign.fallback;

import com.zky.common.exception.BizCodeEnum;
import com.zky.common.utils.R;
import com.zky.gulimall.product.feign.SecKillFeignService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * @Description 熔断
 * @Author 张开源
 * @Date 2023/1/7 15:49
 * @Version 1.0
 **/
@Service
@Slf4j
public class SecKillFeignServiceFallBack implements SecKillFeignService {
    @Override
    public R getSkuSecKillInfo(Long skuId) {
        log.warn("SecKillFeignServiceFallBack getSkuSecKillInfo fallBack");
        return R.error(BizCodeEnum.TO_MANY_REQUEST.getCode(), BizCodeEnum.TO_MANY_REQUEST.getMsg());
    }
}
